/**
 * 
 */
package soa.security.mgr.service;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import soa.security.domain.Region;
import soa.security.exception.OrganizationException;

/**
 * @author Cre.Gu
 *
 */
public interface RegionMgrService {

	public void addRegion(String parentDn, Region region)
			throws OrganizationException;

	public void updateRegion(String parentDn, Region region)
			throws OrganizationException;

	Page<Region> allRegions(String parentDn, PageRequest pageRequest)
			throws OrganizationException;

	public List<Region> allRegions(String parentDn,
			Map<String, Object> parameters) throws OrganizationException;

	List<Region> allRegions(String parentDn) throws OrganizationException;

	Region findByDn(String dn) throws OrganizationException;

	boolean deleteByDn(String dn) throws OrganizationException;

	public Region initRoot();

	public boolean existCode(String dn, String code);

	public Region existByCode(String code);
}
